package com.any.hook.core.webapi.config;

import com.any.hook.common.exception.ErrorCode;

public enum WebApiErrorCode implements ErrorCode {
    API_JOB_PARAM_CHECKERROR("WebApi-01", "[JOB] 参数校验失败 ."),
    API_RUNTIME_ERROR("WebApi-00", "[JOB] 运行时错误 ."),
    API_JOB_LOGIC_ERROR("WebApi-02","[JOB] 程序逻辑检测错误，目测是个bug，请联系开发人员 ."),
    API_JSON_LOGIC_ERROR("WebApi-03","[JSON] 程序逻辑检测错误，目测是个bug，请联系开发人员 .");

    private final String code;
    private final String description;

    private WebApiErrorCode(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDescription() {
        return this.description;
    }

    @Override
    public String toString() {
        return String.format("Code:[%s], Description:[%s]. ", this.code,
                this.description);
    }
}
